package com.tensquare.qa.client;

import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

// fallback : 指定调用失败的备用方案提供类
@FeignClient(value = "tensquare-base",fallback = LabelClientImpl.class)
public interface LabelClient {

   /*
      远程调用tensquare-base微服务中的/label/{labelId}接口
    */

   // 查 根据ID查询
   @RequestMapping(value = "/label/{labelId}" , method = RequestMethod.GET)
   public Result findById(@PathVariable("labelId") String labelId);

}
